// 表格列
import tagRender from '@/components/aggridCellRenDerer/tagRender.vue'

let tableColumns: any = [
    {
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 60,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '出库单号',
        field: 'outOrder',
        width: 180,
    },
    {
        headerName: '领料单号',
        field: 'materialRequestNo',
        width: 180,
    },
    {
        headerName: '公司',
        field: 'firmName',
        width: 180,
    },
    {
        headerName: '仓库名称',
        field: 'warehouseName',
        width: 180,
    },
    {
        headerName: '区域',
        field: 'area',
        width: 180,
    },
    {
        headerName: '物料大类',
        field: 'majorCategory',
        width: 180,
    },
    {
        headerName: '物料中类',
        field: 'middleCategory',
        width: 150,
    },
    {
        headerName: '物料小类',
        field: 'subCategory',
        width: 180,
    },

    {
        headerName: '物料编号',
        field: 'materialCode',
        width: 180,
    },
    {
        headerName: '物料名称',
        field: 'materialName',
        width: 195,
    },
    {
        headerName: '规格',
        field: 'specification',
        width: 180,
    },

    {
        headerName: '数量',
        field: 'totalNum',
        width: 180,
    },
    {
        headerName: '单位',
        field: 'unit',
        width: 180,
    },
    {
        headerName: '推送状态',
        field: 'pushState',
        width: 180,
        cellRenderer: tagRender,
        cellRendererParams: {
            styleClass: (params: any) => {
                return params.pushState == 0
                    ? 'warning'
                    : params.pushState == 1
                        ? 'success'
                        : ''
            },
            text: (params: any) => {
                return params.pushState == 0
                    ? '未推送'
                    : params.pushState == 1
                        ? '已推送'
                        : ''
            },
            eltagSize: 0,
        },
        cellStyle: (params: any) => {
            if (params.node.rowPinned == 'bottom') return { display: 'none' }
        },
        filterParams: {
            valueFormatter: function (params: any) {
                return params.value == '1' ? '已推送' : params.value == '0' ? '未推送' : ''
            },
        },
    },
    {
        headerName: '创建人',
        field: 'createName',
        width: 180,
    },
    {
        headerName: '创建时间',
        field: 'createTime',
        width: 180,
    },
    {
        headerName: '更新人',
        field: 'updateName',
        width: 180,
    },
    {
        headerName: '更新时间',
        field: 'updateTime',
        width: 180,
    },
]
let tableColumns1: any = [
    {
        headerCheckboxSelection: true,
        checkboxSelection: true,
        width: 60,
        showDisabledCheckboxes: false,
        pinned: 'left',
    },
    {
        headerName: '仓库名称',
        field: 'warehouseName',
        width: 180,
    },
    {
        headerName: '唯一编号',
        field: 'numberId',
        width: 180,
    },
    {
        headerName: '物料大类',
        field: 'majorCategory',
        width: 180,
    },
    {
        headerName: '物料中类',
        field: 'middleCategory',
        width: 150,
    },
    {
        headerName: '物料小类',
        field: 'subCategory',
        width: 180,
    },

    {
        headerName: '物料编号',
        field: 'materialCode',
        width: 180,
    },
    {
        headerName: '物料名称',
        field: 'materialName',
        width: 195,
    },
    {
        headerName: '规格',
        field: 'specification',
        width: 180,
    },
    {
        headerName: '位置号',
        field: 'floorDistrict',
        width: 180,
    },
    {
        headerName: '区域',
        field: 'district',
        width: 180,
    },
    {
        headerName: '数量',
        field: 'totalNum',
        width: 180,
    },
    {
        headerName: '单位',
        field: 'unit',
        width: 180,
    },
]

export {
    tableColumns,
    tableColumns1,
}